group_name @master

hostlist {% for host in groups['master'] -%}
    {{ '%s ' % hostvars[host].private_ip|default(hostvars[host].ansible_hostname) }}
{%- endfor %}
